<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="h" uri="/syzg-html"%>

<!DOCTYPE html>
<html>
	<head>
		<%@ include file="/base/jsp/common/CommonListTop.jsp"%>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>[基础数据管理-数据列表]</title>
		<link href="${ctx}/base/css/base.css" rel="stylesheet" type="text/css" />
		<link href="${ctx}/base/css/common.css" rel="stylesheet" type="text/css" />
		<link href="${ctx}/base/css/${customTheme}.css" rel="stylesheet" type="text/css" />
		<script src="${ctx}/base/js/base.js" type="text/javascript"></script>
		<script src="${ctx}/base/js/common/FormFunction.js" type="text/javascript"></script>
		<script src="${ctx}/baseNew/plugins/jQuery/jQuery-2.2.0.min.js"></script>
		<link href="${ctx}/baseNew/bootstrap/css/bootstrap.min.css" rel="stylesheet">
		<script src="${ctx}/baseNew/bootstrap/js/bootstrap.js" type="text/javascript"></script>
    	<link href="${ctx}/baseNew/other/css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
		<script src="${ctx}/baseNew/other/js/bootstrap-datetimepicker.js" type="text/javascript"></script>
		<script src="${ctx}/baseNew/other/js/locales/bootstrap-datetimepicker.zh-CN.js" type="text/javascript"></script>
		<link rel="stylesheet" href="${ctx}/baseNew/dist/css/AdminLTE.min.css">
  		<link rel="stylesheet" href="${ctx}/baseNew/dist/css/skins/_all-skins.min.css">
  		<script src="${ctx}/baseNew/other/js/bootbox.min.js" type="text/javascript"></script>
  		<link rel="stylesheet" href="${ctx}/baseNew/validator/css/bootstrapValidator.css"/>
		<script type="text/javascript" src="${ctx}/baseNew/validator/js/bootstrapValidator.js"></script>
		<link rel="stylesheet" href="${ctx}/zenithsun/css/admin-imgList.css"/>
		<!-- 公用的按钮函数 -->
		<script>
			var addUrl = "${ctx}/path/basicdata/initbasicdata";//表单列表add 的url地址
			var delUrl = "${ctx}/path/basicdata/delbasicdata";//表单列表del的url地址
			var viewUrl = "${ctx}/path/basicdata/viewbasicdata";//表单列表view的url地址
			var editUrl = "${ctx}/path/basicdata/editbasicdata";//表单列表edit的url地址
			var listUrl = "${ctx}/path/basicdata/listbasicdata";//表单列表list 的url地址,用来作为搜索地址
			var saveAddUrl = "${ctx}/path/basicdata/addbasicdata";//表单列表save的url地址
			var saveEditUrl = "${ctx}/path/basicdata/modbasicdata";//表单列表save的url地址
 
			function defaultEvent(eventType,width,height) {
				FormFunction.defaultEvent(eventType,width,height);//默认的处理函数，需自定义时自己写 在PublicFunction.js里
			}
		</script>
	</head>

	<body class="rightBody">
		<form name="searchForm" method="post" action="" class="form-inline">
			<table width="100%" class="title" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<th>
						<img src="${ctx}/zenithsun/images/back.png" width="26" height="26" alt="图标 " class="icon" />
						<em class="headTips">系统管理</em> &gt; 基础数据管理
					</th>
					<th width="200"></th>
				</tr>
				<tr>
					<td>
						<label class="control-label sr-only" for="searchValue_'id'_">ID：</label>
						<input type="text" name="searchValue['id']" id="searchValue_Id" class="form-control input-sm" placeholder="ID..."/>&nbsp;
						<label class="control-label sr-only" for="searchValue_'code'_">标识：</label>
						<input type="text" name="searchValue['code']" id="searchValue_Code" class="form-control input-sm" placeholder="标识..."/>
						<label class="control-label sr-only" for="searchValue_'parentId'_">父ID：</label>
						<input type="text" name="searchValue['parentId']" id="searchValue_parentId" class="form-control input-sm" placeholder="父ID..."/>&nbsp;
						<input type="button" value="搜索" class="btn btn-primary btn-sm" onclick="defaultEvent('search')" />
						<input name="" type="reset" value="重置" class="btn btn-primary btn-sm" />
					</td>
					<td align="right">
						<input name="add" type="button" class="btn btn-primary btn-sm" value="新增" onclick="FormFunction.showAddModal()" />
						<input name="del" type="button" class="btn btn-primary btn-sm" value="删除" onclick="defaultEvent('del')" />
					</td>
				</tr>
			</table>
			<h:table cssClass="table table-bordered table-hover table-striped" cssStyle="margin-bottom:-5px;">
				<h:column headerTitle="<input type='checkbox' name='slectAll' value='checkbox' onclick='selectAll(this.checked);'>" align="center" width="32">
					<input type="checkbox" name="selectedRow" value="${o.id }" />
				</h:column>
				
				<!-- generate code start -->

                <h:column headerTitle="ID" width="10%">
                    ${o.id}
                </h:column>

                <h:column headerTitle="标识" width="10%">
                    ${o.code}
                </h:column>

                <h:column headerTitle="内容" width="30%">
                    ${o.comment}
                </h:column>

                <h:column headerTitle="父ID" width="10%">
                    ${o.parentId}
                </h:column>
                <h:column headerTitle="是否默认" width="10%">
                    <c:if test="${o.defaultFlag=='1'}">是</c:if>
                    <c:if test="${o.defaultFlag=='0'}">否</c:if>
                </h:column>
                <h:column headerTitle="类型" width="10%">
                    <c:if test="${o.type=='SYSTEM'}">系统数据</c:if>
                    <c:if test="${o.type=='BUSINESS'}">业务数据</c:if>
                </h:column>
				<!-- generate code end -->
				
				<h:column headerTitle="操作" width="10%" align="center">
					<a href="javascript:FormFunction.showEditModal('${o.id }');" class="linkorange">修改</a>
					<a href="javascript:FormFunction.delSingle('${o.id }');" class="linkorange">删除</a>
				</h:column>
			</h:table>
			<table width="100%" class="pageDown" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td align="right">
						<h:pager /> &nbsp;
					</td>
				</tr>
			</table>
		</form>
		<div id="myDlg"></div>
		<%@ include file="/base/jsp/common/CommonListFoot.jsp"%>
	</body>
</html>
